Hello and welcome.
In this video we are going to be drawing the clock face.
This will involve modifying the code we had in our previous lecture.
So this is where we left off in the previous lecture.
We created a function called drop clock and when to actually modify this function I'm going to do is
also create on another function called draw face.
I am going to reference that function from inside this drawer clock function.
So I'm going to modify this function here.
I'll get rid of all this.
And just the other function I'm going to create is going to be a function called drop face.
So I'm just going to reference that function here.
I've not created it yet.
I'm going to create it very shortly.
And for the inside the parentheses I'm going to pass saying they say t x and the radius O K.
All right so now let's create the function here called draw fix.
So I have added a block of code for this new function called drop face and thus the function we are
referencing from the drawer clock function which is the function that we have modified.
So I'm just going to run through this block of code.
Be so that would know what's happening here.
So inside the draw phase function we've got to perimeter's the context and call the radius and in between
the curly Is this the opening curly braces.
And this is close in Culebra.
It contains the code that will draw the face for the clock.
So we've got a variable called grabbed.
This is going to be for the gradient.
And then we've got the this code here is from line 14 to line 17.
This block of code here is going to draw the outroar white circle for the face.
So here we call it online 14 we want to begin part of the bargain path method basically begins a path
or can be used to reset the current path.
So this is where the actual path begins.
And Line 14 here we use in the arc method to actually draw the white the circle underneath the perimeters
that will enable that to happen.
This is the master PI.
I explained what that was in our previous lecture and also explained what the film's title does so just
gives it the white face or the background.
The also explained or be contex top feel method.
So the content self feel metod basically feels the current draw in part on line.
A team here we use is variable.
We create it here online Petit called Ghairat.
Basically we are creating a radial gradient which is 95 percent and 1 0 5 percent off the or original
clock radius line 19 to line 20 to 1.
Basically we are creating three colour stops corresponding with that in the middle and the outer edge
of the arc.
Okay so this core loss here represents the inner the middle and outer edge of the arc which is from
line 19 to line twenty one.
Just to note that this core loss top here the colossi top basically is used to create a 3 d e effect.
Next on line 22 here I am defining the gradient as the stroke style of the draw in object.
Line twenty three.
I am define in the line with of the drone object weights.
He is here.
Which would be 10 percent of the radius line 24 we use in this drill method to draw the circle and we
use the block of kord from line 25 to line twenty eight.
To draw the outer wall clock centre so to draw a centre for the clock anywhere you see the big impact
metter basically means there's a path going on here.
This is the beginning and then it will end with the feel here.
So this block of code here twenty five to twenty eight is used to draw B.
Our chool Centre for the clock.
So that is basically it is going to save this and we go back to our hastier.
So a double.
On the clock.
Dr. hastier male and hopefully a girl so this is exactly how I wanted to be.
So this is our travel centre.
Off the clock.
So we now have a face for power.
So in the next lecture will create that function that will be used for the clock numbers.
Thanks for watching.
And by phone.